<template>
    <div class="expense-item-type-div">
        <el-select v-model="value" placeholder="请选择类型" :disabled="disabled" clearable style="width: 100%;" :size="size"
            @change="handleChange">
            <el-option :value="1" label="采购类"></el-option>
            <el-option :value="2" label="生产类"></el-option>
            <el-option :value="3" label="报销类"></el-option>
        </el-select>
    </div>
</template>
<script>
export default {
    data() {
        return {
            value: null
        }
    },
    model: {
        prop: "type",
        event: "innerChange",
    },
    methods: {
        handleChange(value) {
            this.$emit("innerChange", value);
            this.$emit("change", value);
        }
    },
    watch: {
        type: {
            handler(value) {
                this.value = value;
            },
            immediate: true
        }
    },
    props: {
        disabled: {
            type: Boolean,
            default: false
        },
        type: {
            type: Number,
            default: null
        },
        size:{
            type:String
        }
    }
}
</script>
<style lang="css" scoped>
.expense-item-type-div {
    width: 200px;
    display: inline-block;
}
</style>